package com.totoro.spring.spring_demo.property.profile;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Profile;
import org.springframework.context.annotation.PropertySource;
import org.springframework.core.env.Environment;

/**
 * 预发布环境的属性
 * Created by Niki on 2018/6/14 18:22
 */
//@Configuration
//@PropertySource("classpath:properties_pre.properties")
//@Profile("pre")
public class PreProperties implements Properties {
//    @Autowired
    Environment environment;

    @Override
    public String getProperties(String key) {
        return environment.getProperty(key);
    }
}
